using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; 

namespace MyMario.GameObject
{
    abstract class GameObject
    {
        //protected  Vector2 position;
        protected int width;
        protected int height;
        protected bool alive = true;
        protected Rectangle rect;

        public Texture2D Texture;

        public bool Alive
        {
            get { return alive; }
            set { alive = value; }
        }

        public int Width
        {
            get { return width; }
            set { width = value; }
        }

        public int Height
        {
            get { return height; }
            set { height = value; }
        }


        public Rectangle Rect
        {
            get { return rect; }
            set { rect = value; }
        }
       
        /*public Rectangle Rectangle
        {
            get { return new Rectangle((int)position.X, (int)position.Y, width, height); }
            
        }*/

       
        /*public virtual bool OnScreen
        {
            get
            {
                return position.X + width > 0 && position.X < MarioGame.Width
                       && position.Y + height > 0 && position.Y < MarioGame.Height;
            }
        }*/

        public GameObject(Rectangle rect, Texture2D texture)
        {
            this.rect = rect;
            this.Texture = texture;
            width = (int)(Texture.Width );
            height = (int)(Texture.Height );
        }

        public virtual void Update()
        {

        }

        public virtual void Draw(SpriteBatch spritebatch)
        {
            //spritebatch.Draw(Texture, Rectangle, Color.White);
            
        }
    }
}